package com.yuanchu.store.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.yuanchu.common.validator.ValidationGroups;
import lombok.Data;

import javax.validation.constraints.Null;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-02-27 10:35
 */
@Data
public class EditStoreUserParamsDto {
    @Null(message = "用户id不能为空", groups = {ValidationGroups.Delete.class, ValidationGroups.Update.class})
    private Integer userId;
    private StoreUserForm form;

    @Data
    public class StoreUserForm {
        @JsonProperty("real_name")
        private String realName;
        @JsonProperty("user_name")
        private String userName;
        private String password;
        @JsonProperty("password_confirm")
        private String passwordConfirm;
        private Integer sort;
        private List<Integer> roles;
    }
}
